Skip to content

Conversation

@AnthonyCvn
Copy link
Member

Closes #164

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Bug fix

What was changed?

Fix time range dropdown preset selection not exiting Custom mode

Related issues

No

Does this PR introduce a breaking change?

No

Other information:

Copilot AI review requested due to automatic review settings January 22, 2026 15:01
@AnthonyCvn AnthonyCvn linked an issue Jan 22, 2026 that may be closed by this pull request
1 task
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the time range dropdown preset selection was not properly exiting Custom mode. The issue occurred because preset time ranges were calculated once at component mount and became stale, preventing the system from recognizing when users selected matching presets.

Changes:

  • Updated the useMemo dependency array for the presets calculation to recalculate when the menu or picker opens
  • Updated CHANGELOG.md to document the bug fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Components/Entry/TimeRangeDropdown.tsx Added menuOpen and pickerOpen to the presets memoization dependencies to ensure time-based presets are recalculated with current time when the picker/menu opens
CHANGELOG.md Added entry documenting the bug fix (with incorrect PR number reference)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

AnthonyCvn and others added 2 commits January 22, 2026 16:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AnthonyCvn AnthonyCvn merged commit 3dcc3b2 into main Jan 22, 2026
5 checks passed
@AnthonyCvn AnthonyCvn deleted the 164-bug-time-panel-doesnt-show-chosen-time-interval-correctly branch January 22, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Time panel doesn't show chosen time interval correctly

2 participants